package cxg.cloud.service.impl;

import cxg.cloud.entity.DeptPO;
import cxg.cloud.mapper.DeptMapper;
import cxg.cloud.service.DeptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 */
@Slf4j
@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptMapper deptMapper;


    @Override
    public List<DeptPO> findAll() {
        return deptMapper.queryAll();
    }

    @Override
    public DeptPO getById(Integer deptId) {
        if(null == deptId){
            return null;
        }
        return deptMapper.selectByDeptId(deptId);
    }

}
